package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 消息业务对象 p_message
 *
 * @author ruoyi
 * @date 2022-07-28
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("消息业务对象")
public class PMessageBo extends BaseEntity {

    /**
     * 
     */
    @ApiModelProperty(value = "", required = true)
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 消息标题
     */
    @ApiModelProperty(value = "消息标题", required = true)
    @NotBlank(message = "消息标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 一级类型 0 系统消息 1 消息通知
     */
    @ApiModelProperty(value = "一级类型 0 系统消息 1 消息通知", required = true)
    @NotBlank(message = "一级类型 0 系统消息 1 消息通知不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 二级类型 0 平台发送的系统消息 1 订单消息 2 咨询师回复的消息 3 收入消息
     */
    @ApiModelProperty(value = "二级类型 0 平台发送的系统消息 1 订单消息 2 咨询师回复的消息 3 收入消息", required = true)
    @NotBlank(message = "二级类型 0 平台发送的系统消息 1 订单消息 2 咨询师回复的消息 3 收入消息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String secondType;

    /**
     * 消息内容
     */
    @ApiModelProperty(value = "消息内容", required = true)
    @NotBlank(message = "消息内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String msg;

    /**
     * 发布人id
     */
    @ApiModelProperty(value = "发布人id", required = true)
    @NotNull(message = "发布人id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long createUserId;

    /**
     * 接收人id
     */
    @ApiModelProperty(value = "接收人id", required = true)
    @NotNull(message = "接收人id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long toUserId;

    /**
     * 状态 0 未读 1 已读
     */
    @ApiModelProperty(value = "状态 0 未读 1 已读", required = true)
    @NotBlank(message = "状态 0 未读 1 已读不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;


}
